package com.tess.tboot.serviceimpl;


import com.tess.tboot.base.TbootServiceImpl;
import com.tess.tboot.dao.mapper.MenuMapper;
import com.tess.tboot.entity.Menu;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 菜单接口实现
 * @author Exrickx
 */
@Slf4j
@Service
@Transactional
public class MenuServiceImpl extends TbootServiceImpl<MenuMapper,Menu> {

    @Autowired
    private MenuMapper menuMapper;


    public List<Menu> findByParent(Boolean parent) {

        return menuMapper.findByParent(parent);
    }

    public List<Menu> findByParentId(String parentId) {

        return menuMapper.findByParentId(parentId);
    }
}
